package com.cyys.modules.system.dao.org;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cyys.common.mapper.CyysBaseMapper;
import com.cyys.modules.system.model.org.OrgNotice;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


public interface OrgNoticeDao extends CyysBaseMapper<OrgNotice> {

    /**
     *查询已读明细
     * @param orgId
     * @param noticeId
     */
    List<Map> userReadDetail(Page page, @Param("orgId") String orgId, @Param("noticeId") String noticeId,
                                 @Param("userName") String userName) throws Exception;

    /**
     * 根据已读信息
     * @param noticeId 必填
     * @param userId  非必填
     */
    List<Map> getReadList(@Param(value = "noticeId") String noticeId, @Param(value = "userId") String userId);

    void insertRead(@Param(value = "orgId") String orgId, @Param(value = "noticeId") String noticeId, @Param(value = "userId") String userId);
}
